<?php

namespace App\Http\Controllers\User;

use App\Models\Register;
use App\Models\RegUser;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Auth;
class UserBaseController extends Controller
{
    protected $user;
    protected $corpid;

    public function __construct()
    {
        if(empty(Auth::user())){
            abort(403,'登录信息错误');
        }
        $user = Auth::user()->comuser();
        if(!empty($user)){
            $this->user = $user;
            $this->corpid = $user->corpid;
        }else{
            abort(403,'登录信息错误');
        }
    }
}
